package java_class_work.week04;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Demo02 {
    public static void main(String[] args) {
        Date date = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("北京时间：yyyy-MM-dd HH:mm:ss E");
        System.out.println(sdf.format(date));

        Calendar calendar = Calendar.getInstance();
        System.out.println(calendar.get(Calendar.YEAR));
        System.out.println(calendar.get(Calendar.MONTH) + 1);
        System.out.println(calendar.get(Calendar.DATE));
    }
}
